package cn.tedu.javagame.shoot;

import javax.swing.*;
import java.awt.*;

public class Bullet {
    int x,y;
    static Image bulletImg;
    //静态代码块，当类加载时执行且只执行一次；
    static{
        bulletImg = new ImageIcon("plane/bullets.png").getImage();
    }
    public Bullet(int x,int y){
        this.x = x;
        this.y = y;
    }
    //子弹的移动
    public void move(){
        this.y--;
    }
    //子弹打中敌机
    public boolean hitEnemy(Enemy enemy){
        return false;
    }
}
